import {createBrowserRouter} from "react-router-dom";
import WorkPlace from "../pages/WorkPlace/index.jsx";
import Welcome from "../pages/Welcome/index.jsx";
import CompositionWriting from "../pages/CompositionWriting/index.jsx";
import TextPolishing from "../pages/TextPolishing/index.jsx";
import ShortVideoScript from "../pages/ShortVideoScript/index.jsx";
import Introduce from "../pages/Introduce/index.jsx";
import {AuthRoute} from "../components/AuthRoute/index.jsx";
import PayMent from "../pages/PayMent/index.jsx";
import NovelCreation from "../pages/NovelCreation/NovelCreation.jsx";
import NovelCreationDrawPage from "../pages/NovelCreation/NovelCreationDrawPage/NovelCreationDrawPage.jsx";
import NovelCreationDetail from '../pages/NovelCreation/NovelCreationDetail/NovelCreationDetail.jsx'
import MindChat from "../pages/MindChat/index.jsx";

//配置路由实例
const router = createBrowserRouter([
    {
        path: '/WorkPlace',
        element: <AuthRoute>
            <WorkPlace/>
        </AuthRoute>,
        // element:<WorkPlace/>,
        children: [
            {
                path: '',
                element: <Welcome/>
            },
            {
                path: 'CompositionWriting',
                element: <CompositionWriting/>
            },
            {
                path: 'TextPolishing',
                element: <TextPolishing/>
            },
            {
                path: 'ShortVideoScript',
                element: <ShortVideoScript/>
            },
            {
                path:'PayMent',
                element:<PayMent/>
            },
            {
                path:"NovelCreation",
                element: <NovelCreation/>
            },
            {
                path:'NovelCreationDrawPage',
                element:<NovelCreationDrawPage/>
            },
            {
                path:'NovelCreationDetail',
                element:<NovelCreationDetail/>
            },
            {
                path:'MindChat',
                element:<MindChat/>
            }
        ]
    },
    {
        index: true,
        path: '/',
        element: <Introduce/>
    }
])

export default router
